{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "8fd90446",
   "metadata": {},
   "source": [
    "# 快速成为深度学习全栈工程师第6课书面作业\n",
    "学号：114499\n",
    "\n",
    "**作业内容：**  \n",
    "1. 请截图提交搭建好的jupyter主页以及常见一个notebook，并列去5个你最喜欢的nbextesions的功能，并简单解释原因\n",
    "\n",
    "## 1. Jupyter主页截图"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f99d19ea",
   "metadata": {},
   "source": [
    "![full-04](https://gitee.com/dotzhen/cloud-notes/raw/master/full-04.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "86f89d9b",
   "metadata": {},
   "source": [
    "## 2. 尝试搭建一个Notebook\n",
    "本作业就是基于Jupyter notebook来写的，先来一段小程序。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f55e18bb",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-01-01T07:20:30.260145Z",
     "start_time": "2022-01-01T07:20:28.262280Z"
    }
   },
   "outputs": [],
   "source": [
    "import torch\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "cac42007",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2022-01-01T07:29:41.548234Z",
     "start_time": "2022-01-01T07:29:41.530231Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ones Tensor: \n",
      " tensor([[1, 1],\n",
      "        [1, 1]]) \n",
      "\n",
      "Random Tensor: \n",
      " tensor([[0.9306, 0.3506],\n",
      "        [0.8369, 0.4453]]) \n",
      "\n"
     ]
    }
   ],
   "source": [
    "data = [[1, 2], [3, 4]]\n",
    "x_data = torch.tensor(data)\n",
    "np_array = np.array(data)\n",
    "x_np = torch.from_numpy(np_array)\n",
    "x_ones = torch.ones_like(x_data)  # retains the properties of x_data\n",
    "print(f\"Ones Tensor: \\n {x_ones} \\n\")\n",
    "x_rand = torch.rand_like(x_data,\n",
    "                         dtype=torch.float)  # overrides the datatype of x_data\n",
    "print(f\"Random Tensor: \\n {x_rand} \\n\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9bcb1fde",
   "metadata": {},
   "source": [
    "截图："
   ]
  },
  {
   "cell_type": "markdown",
   "id": "25aba89e",
   "metadata": {},
   "source": [
    "![full06-6](https://gitee.com/dotzhen/cloud-notes/raw/master/full06-6.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a8cebc5e",
   "metadata": {},
   "source": [
    "## 3. 5个你最喜欢的nbextesions的功能，并简单解释原因"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "efa41337",
   "metadata": {},
   "source": [
    "![full06-3](https://gitee.com/dotzhen/cloud-notes/raw/master/full06-3.png)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "56fda0a0",
   "metadata": {},
   "source": [
    "1. **Code prettify**:可以优化你代码排版，全自动，方便。  \n",
    "2. **Toggle all line numbers**:有时候代码写错时，会提示哪一行错了，但是原notebook中没有代码行显示，找起来很麻烦，这个插件很实用。  \n",
    "3. **ExecuteTime**:一个cell运行完成后，提示执行时间，避免了有时要用代码实现执行时间打印的功能，实用。  \n",
    "4. **Tree Filter**:查找文件很方便。  \n",
    "5. **Variable Inspector**:查看运行时变量，太方便了，避免了大量的打印语句。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
